<template>
 <div>
  <cart-header></cart-header>
  <cart-item v-for="item in list" :key="item.id" :item="item"></cart-item>
  <cart-footer></cart-footer>
 </div>
</template>
<script>
import CartHeader from '@/components/cart-header.vue'
import CartFooter from '@/components/cart-footer.vue'
import CartItem from '@/components/cart-item.vue'
import { mapState } from 'vuex'
export default{
    name:'App',
    components: {
    CartHeader,
    CartFooter,
    CartItem
  },
    data () {
        return {
            
        }
    },
    created () {
      this.$store.dispatch('cart/getList')
    },
    computed:{
      ...mapState('cart', ['list'])
    },
    methods:{
    }
}
</script>
<style lang='less'  scoped>
    
</style>
